package com.oocl.euc.entity;

import java.io.Serializable;

import javax.annotation.Generated;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.bson.types.ObjectId;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.DBRef;
import org.springframework.data.mongodb.core.mapping.Document;

import com.fasterxml.jackson.annotation.JsonManagedReference;

//@Entity
//@Table(name="tdish")
@Document(collection="dish")
public class Dish{
	@Id
	private String did;
	private String dname;
	private Double price;
	@DBRef
	private Merchant merchant;
	public Dish() {
		super();
		// TODO Auto-generated constructor stub
	}
	public Dish(String did, String dname, Double price, Merchant merchant) {
		super();
		this.did = did;
		this.dname = dname;
		this.price = price;
		this.merchant = merchant;
	}
	public String getDid() {
		return did;
	}
	public void setDid(String did) {
		this.did = did;
	}
	public String getDname() {
		return dname;
	}
	public void setDname(String dname) {
		this.dname = dname;
	}
	public Double getPrice() {
		return price;
	}
	public void setPrice(Double price) {
		this.price = price;
	}
	public Merchant getMerchant() {
		return merchant;
	}
	public void setMerchant(Merchant merchant) {
		this.merchant = merchant;
	}

	

}
